<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
   /* var a = 10,b=15;
    var arr = [a,b];
    var [b,a] = arr;
    console.log(a,b);*/

   /* var obj = {
        a:1,
        b:2
    };
    var {b,a} = obj;
    console.log(a,b);*/

   var [head, ...tail] = [1, 2, 3, 4];
   console.log(tail);

</script>
</html>